package com.qf.zyh.services.Impl;

import com.qf.zyh.dao.TUsersMapper;
import com.qf.zyh.entity.TUsers;
import com.qf.zyh.services.TUsersSer;

import java.util.List;

public class TUserSerImpl implements TUsersSer {
    private TUsersMapper tum;

    public TUsersMapper getTum() {
        return tum;
    }

    public void setTum(TUsersMapper tum) {
        this.tum = tum;
    }

    @Override
    public List<TUsers> getall() {
        return tum.getall();
    }

    @Override
    public TUsers getname(String username, String password) {
        TUsers ts = tum.getname(username);
        System.out.println(ts);
        if (ts!=null) {
            System.out.println(ts.getPassword()+"---"+password);
            if (ts.getPassword().equals(password)) {
                System.out.println(ts);
                System.out.println(ts.getPassword());
                return ts;
            }
        }
        return null;
    }
}
